<?php
function admin_page() {
if( $_GET['action'] == 'delete' ) {
	delete_error($_GET['err_id']);
?>
	<div class="updated"><p><strong>Entry deleted.</strong></p></div>
<?php
}

// Display the options screen
echo '<div class="wrap">';
echo '<h2>Reported Plug-in Errors</h2>';
?>

<form action="" method="post">

<div class="tablenav">

<div class="alignright actions">

<select name="filter"> 
	<option value="sourceUID" <?php if ($_GET['filter'] == 'sourceUID') echo 'selected="selected"'; ?>>UID</option> 
	<option value="wpVersion" <?php if ($_GET['filter'] == 'wpVersion') echo 'selected="selected"'; ?>>WP Version</option> 
	<option value="phpVersion" <?php if ($_GET['filter'] == 'phpVersion') echo 'selected="selected"'; ?>>PHP Version</option>
	<option value="fopen" <?php if ($_GET['filter'] == 'fopen') echo 'selected="selected"'; ?>>Allow_url_fopen</option> 
	<option value="pluginName" <?php if ($_GET['filter'] == 'pluginName') echo 'selected="selected"'; ?>>Plugin Name</option> 
	<option value="pluginVersion" <?php if ($_GET['filter'] == 'pluginVersion') echo 'selected="selected"'; ?>>Plugin Version</option>
	<option value="message" <?php if ($_GET['filter'] == 'message') echo 'selected="selected"'; ?>>Message</option> 
</select>
<input type="text" name="search" value="<?php echo $_GET['search']; ?>" /> 
<input type="submit" name="dosearch" value="Filter" class="button-secondary" />

</div>

<div class="alignleft actions">

<select name="action"> 
	<option value="-1" selected="selected">Bulk Actions</option> 
	<option value="delete">Delete</option>
</select>
<input type="submit" name="doaction" id="doaction" value="Apply" class="button-secondary" />

</div>

</div>

<table class="widefat fixed" cellspacing="0">
<thead>
<tr class="thead">
	<th scope="col" class="manage-column check-column"><input type="checkbox" /></th>
	<th scope="col" id="uid" class="manage-column column-uid" style="">UID</th>
	<th scope="col" id="wp_ver" class="manage-column column-wp_ver" style="">WP Version</th>
	<th scope="col" id="php_ver" class="manage-column column-php_ver" style="">PHP Version</th>
	<th scope="col" id="fopen" class="manage-column column-fopen" style="">Allow_url_fopen</th>
	<th scope="col" id="plugin" class="manage-column column-plugin" style="">Plugin Name</th>
	<th scope="col" id="version" class="manage-column column-version" style="">Plugin Version</th>
	<th scope="col" id="message" class="manage-column column-message" style="">Message</th>
</tr>
</thead>

<tfoot>
<tr class="thead">
	<th scope="col" class="manage-column check-column"><input type="checkbox" /></th>
	<th scope="col" id="uid" class="manage-column column-uid" style="">UID</th>
	<th scope="col" id="wp_ver" class="manage-column column-wp_ver" style="">WP Version</th>
	<th scope="col" id="php_ver" class="manage-column column-php_ver" style="">PHP Version</th>
	<th scope="col" id="fopen" class="manage-column column-fopen" style="">Allow_url_fopen</th>
	<th scope="col" id="plugin" class="manage-column column-plugin" style="">Plugin Name</th>
	<th scope="col" id="version" class="manage-column column-version" style="">Plugin Version</th>
	<th scope="col" id="message" class="manage-column column-message" style="">Message</th>
</tr>
</tfoot>
<tbody id="reported_errors" class="list">
<?php
error_list($_GET['filter'], $_GET['search']);
?>
</tbody>
</table>

</form>

</div>
<?php } ?>